package com.example.demo.ws.hzuoj.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.example.demo.ws.hzuoj.entity.UserRole;
import com.example.demo.ws.hzuoj.mapper.UserRoleMapper;
import com.example.demo.ws.hzuoj.service.UserRoleService;
import com.example.demo.ws.hzuoj.util.UserRoleUtil;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author weifucheng
 */
@Service
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements UserRoleService {
    @Autowired
    UserRoleMapper userRoleMapper;

	@Override
	public List<UserRole> selectBySeachParam(Map<String, Object> searchParam, Page<UserRole> page) {
		// TODO Auto-generated method stub
		String sql=UserRoleUtil.getSql(searchParam);
		return userRoleMapper.selectBySeachParam(sql, searchParam, page);
	}

	@Override
	public List<UserRole> selectBySeachParam(Map<String, Object> searchParam) {
		// TODO Auto-generated method stub
		String sql=UserRoleUtil.getSql(searchParam);
		return userRoleMapper.selectBySeachParam(sql, searchParam);
	}
	
	@Override
	public List<UserRole> selectBySql(String sql){
		return userRoleMapper.selectBySql(sql);
	}
}
